#ifndef SPLITTER_H
#define SPLITTER_H

#include <QtGui/QWidget>
#include <QSplitter>
#include <QTextCharFormat>
class MainWindow;
class TextEditor;

class Splitter : public QSplitter{
Q_OBJECT

/* NOTE:
 * 
 * When you hide() a child its space will be distributed 
 * among the other children. It will be reinstated when you show() it again.
 */
public:
    Splitter(MainWindow *parent = 0);
    ~Splitter();
    void init();
    void currentCharFormatChanged(const QTextCharFormat & f);


    
public slots:
	void setBold();
	void setItalic();
	void setUnderline();
	void setTextFamily(const QString& familyIdentifier);
	void setTextSize(const QString& sizeIdentifier);
	void setAlign(QAction* action);

private:
	MainWindow* main_window;
	TextEditor* work_editor;
	TextEditor* observe_editor;

};

#endif // SPLITTER_H
